function AnQuan(){
    // 安全分析
// 事件趋势分析
    $(function(){
        var myChart = echarts.init($("#shijian01")[0]);
        
		
		$.ajax({
		    url: "http://47.108.119.245:9527/bdAccident/countAccidentEachMonth", //请求地址
		    dataType: "json", //数据格式 
		    type: "get", //请求方式
		    async: true, //是否异步请求
		    success: function(response) {
				option = {
				
				    tooltip: {
				        trigger: "item",
				        formatter: "{a} <br/>{b} : {c}"
				    },
				    legend: {
				        x: 'center',
				        data: ["案件趋势分析"],
				        textStyle:{
				            color:"#e9ebee"
				
				        }
				    },
				    xAxis: [
				        {
				            type: "category",
				            name: "x",
				            splitLine:{show: false},
				            axisLabel : {
				                formatter: '{value} ',
				                textStyle: {
				                    color: '#a4a7ab',
				                    align: 'right'
				                }
				            },
				            data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
				        }
				    ],
				    grid:{
				        borderWidth:0
				    },
				    yAxis: [
				        {
				            type: "log",
				            name: "y",
				            splitLine:{show: false},
				            data : ['10','30','50','70','90','110','120','130','150','170','190','210','250'],
				            axisLabel : {
				
				                textStyle: {
				                    color: '#a4a7ab',
				                    align: 'right'
				                }
				            },
				        }
				    ],
				
				    calculable: false,
				    series: [
				        {
				            name: "案件趋势分析",
				            type: "line",
				            data:[response.data[0].count, response.data[1].count, response.data[2].count, response.data[3].count, response.data[4].count, response.data[5].count, response.data[6].count, response.data[7].count, response.data[8].count, response.data[9].count, response.data[10].count, response.data[11].count],
				            itemStyle: {
				                normal: {
				                    color:"#0aabff"
				                }
				            }
				
				        }
				
				    ]
				};
				
				
				myChart.setOption(option);
			},
			})
    });
// 事件级别分析
    $(function(){
        var myChart = echarts.init($("#shijian02")[0]);
        var placeHoledStyle = {
            normal:{
                barBorderColor:'rgba(0,0,0,0)',
                color:'rgba(0,0,0,0)'
            },
            emphasis:{
                barBorderColor:'rgba(0,0,0,0)',
                color:'rgba(0,0,0,0)'
            }
        };
        var dataStyle = {
            normal: {
                label : {
                    show: true,
                    position: 'insideLeft',
                    formatter: '{c}%'
                }
            }
        };
        
		
		var xing;
		var ming;
		var xiao;
		var yi;
		$.ajax({
		    url: "http://47.108.119.245:9527/bdAccident/countAccidentDegree", //请求地址
		    dataType: "json", //数据格式 
		    type: "get", //请求方式
		    async: true, //是否异步请求
		    success: function(response) {
				xing = [response.data[12].count,response.data[13].count,response.data[14].count,response.data[15].count];
				ming = [response.data[8].count,response.data[9].count,response.data[10].count,response.data[11].count];
				xiao = [response.data[4].count,response.data[5].count,response.data[6].count,response.data[7].count];
				yi = [response.data[0].count,response.data[1].count,response.data[2].count,response.data[3].count];
				option = {
				
				    tooltip : {
				        trigger: 'axis',
				        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
				            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
				        },
				        formatter : '{b}<br/>{a0}:{c0}%<br/>{a1}:{c1}%<br/>{a2}:{c2}%<br/>{a3}:{c3}%<br/>'
				    },
				    legend: {
				        y: 55,
				        data:['极重', '严重','一般', '轻微'],
				        textStyle:{
				            color:"#fff"
				
				        }
				    },
				
				    grid: {
				        y: 80,
				        y2: 30
				    },
				    xAxis : [
				        {
				            type : 'value',
				            position: 'top',
				            splitLine: {show: false},
				            axisLabel: {show: false}
				        }
				    ],
				    yAxis : [
				        {
				            type : 'category',
				            splitLine: {show: false},
				            axisLabel : {
				
				                textStyle: {
				                    color: '#fff',
				                    align: 'right'
				                }
				            },
				            data : ['医疗事件', '消防事件', '民事事件', '刑事事件']
				        }
				    ],
				    series : [
				        {
				            name:'极重',
				            type:'bar',
				            stack: '总量',
				            data:[yi[0], xiao[0], ming[0], xing[0]],
				            itemStyle: {
				                normal: {
				                    color:"#1afffd"
				                }
				            }
				        },
				        
				        
				        {
				            name:'严重',
				            type:'bar',
				            stack: '总量',
				            itemStyle: placeHoledStyle,
				            data:[yi[1], xiao[1], ming[1], xing[1]],
				            itemStyle: {
				                normal: {
				                    color:"#005ea1"
				                }
				            }
				        },
				        
				        {
				            name:'一般',
				            type:'bar',
				            stack: '总量',
				            itemStyle: placeHoledStyle,
				            data:[yi[2], xiao[2], ming[2], xing[2]],
				            itemStyle: {
				                normal: {
				                    color:"#e15828"
				                }
				            }
				        },
				        
				        {
				            name:'轻微',
				            type:'bar',
				            stack: '总量',
				            itemStyle: placeHoledStyle,
				            data:[yi[3], xiao[3], ming[3], xing[3]],
				            itemStyle: {
				                normal: {
				                    color:"#feb602"
				                }
				            }
				        }
				    ]
				};
				myChart.setOption(option);
			},
			})
    });
// 事件类型分析
    $(function(){
        var myChart = echarts.init($("#shijian03")[0]);
        var labelTop = {
            normal : {
                label : {
                    show : true,
                    position : 'center',
                    formatter : '{b}',
                    textStyle: {
                        baseline : 'bottom'
                    }
                },
                labelLine : {
                    show : false
                }
            }
        };
        var labelFromatter = {
            normal : {
                label : {
                    formatter : function (params){
                        return 100 - params.value + '%'
                    },
                    textStyle: {
                        baseline : 'top'
                    }
                }
            },
        }
        var labelBottom = {
            normal : {
                color: '#111b21',
                label : {
                    show : true,
                    position : 'center'
                },
                labelLine : {
                    show : false
                }
            },
            emphasis: {
                color: 'rgba(0,0,0,0)'
            }
        };
        var radius = [40, 55];
        
		
		$.ajax({
		    url: "http://47.108.119.245:9527/bdAccident/getAccidentTypeAndState", //请求地址
		    dataType: "json", //数据格式 
		    type: "get", //请求方式
		    async: true, //是否异步请求
		    success: function(response) {
				option = {
				    legend: {
				        x : 'center',
				
				        textStyle:{
				            color:"#fff"
				
				        },
				        data:[
				            '医疗','消防','民事','刑事','其它'
				
				        ]
				    },
				
				
				    series : [
				        {
				            type : 'pie',
				            center : ['10%', '30%'],
				            radius : radius,
				            x: '0%', // for funnel
				            itemStyle : labelFromatter,
				            data : [
				                {name:'解决', value:response.data[0].stateFinishCount, itemStyle : labelBottom},
				                {name:'医疗', value:response.data[0].stateUnFinishCount,itemStyle : labelTop}
				            ],
				            itemStyle: {
				                normal: {
				                    color:"#0ad5ff"
				                }
				            }
				        },
				        {
				            type : 'pie',
				            center : ['30%', '30%'],
				            radius : radius,
				            x:'20%', // for funnel
				            itemStyle : labelFromatter,
				            data : [
				                {name:'解决', value:response.data[1].stateFinishCount, itemStyle : labelBottom},
				                {name:'消防', value:response.data[1].stateUnFinishCount,itemStyle : labelTop}
				            ],
				            itemStyle: {
				                normal: {
				                    color:"#ffcb89"
				                }
				            }
				        },
				        {
				            type : 'pie',
				            center : ['50%', '30%'],
				            radius : radius,
				            x:'40%', // for funnel
				            itemStyle : labelFromatter,
				            data : [
				                {name:'解决', value:response.data[2].stateFinishCount, itemStyle : labelBottom},
				                {name:'民事', value:response.data[2].stateUnFinishCount,itemStyle : labelTop}
				            ],
				            itemStyle: {
				                normal: {
				                    color:"#2e7cff"
				                }
				            }
				        },
				        {
				            type : 'pie',
				            center : ['70%', '30%'],
				            radius : radius,
				            x:'60%', // for funnel
				            itemStyle : labelFromatter,
				            data : [
				                {name:'解决', value:response.data[3].stateFinishCount, itemStyle : labelBottom},
				                {name:'刑事', value:response.data[3].stateUnFinishCount,itemStyle : labelTop}
				
				            ],
				            itemStyle: {
				                normal: {
				                    color:"#4cffd3"
				                }
				            }
				        },
				
				
				        {
				            type : 'pie',
				            center : ['90%', '30%'],
				            radius : radius,
				            // for funnel
				            x:'80%', // for funnel
				            itemStyle : labelFromatter,
				            data : [
				                {name:'解决', value:70, itemStyle : labelBottom},
				                {name:'其它', value:11,itemStyle : labelTop}
				            ],
				            itemStyle: {
				                normal: {
				                    color:"#feb602"
				                }
				            }
				        }
				    ]
				};
				myChart.setOption(option);
			},
			})
    });
// 事发时间特征分析
    $(function(){
        var myChart = echarts.init($("#shijian04")[0]);
        
		
		var jan;
		var feb;
		var mar;
		var apr;
		var may;
		var jun;
		var jul;
		var aug;
		var sep;
		var oct;
		var nov;
		var dec;
		$.ajax({
		    url: "http://47.108.119.245:9527/bdAccident/getAccidentTypeInMonth", //请求地址
		    dataType: "json", //数据格式 
		    type: "get", //请求方式
		    async: true, //是否异步请求
		    success: function(response) {
				jan = [response.data[0].count,response.data[12].count,response.data[24].count,response.data[36].count,response.data[48].count];
				feb = [response.data[1].count,response.data[13].count,response.data[25].count,response.data[37].count,response.data[49].count];
				mar = [response.data[2].count,response.data[14].count,response.data[26].count,response.data[38].count,response.data[50].count];
				apr = [response.data[3].count,response.data[15].count,response.data[27].count,response.data[39].count,response.data[51].count];
				may = [response.data[4].count,response.data[16].count,response.data[28].count,response.data[40].count,response.data[52].count];
				jun = [response.data[5].count,response.data[17].count,response.data[29].count,response.data[41].count,response.data[53].count];
				jul = [response.data[6].count,response.data[18].count,response.data[30].count,response.data[42].count,response.data[54].count];
				aug = [response.data[7].count,response.data[19].count,response.data[31].count,response.data[43].count,response.data[55].count];
				sep = [response.data[8].count,response.data[20].count,response.data[32].count,response.data[44].count,response.data[56].count];
				oct = [response.data[9].count,response.data[21].count,response.data[33].count,response.data[45].count,response.data[57].count];
				nov = [response.data[10].count,response.data[22].count,response.data[34].count,response.data[46].count,response.data[58].count];
				dec = [response.data[11].count,response.data[23].count,response.data[35].count,response.data[47].count,response.data[59].count];
				option = {
				    tooltip : {
				        trigger: 'axis',
				        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
				            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
				        }
				    },
				    legend: {
				        data:['医疗事件', '消防事件','刑事','民事','其它'],
				        textStyle:{
				            color:"#fff"
				
				        },
				    },
				
				    calculable : false,
				    xAxis : [
				        {
				            type : 'value',
				            splitLine: {show: false},
				            axisLabel : {
				
				                textStyle: {
				                    color: '#fff',
				                    align: 'right'
				                }
				            },
				        }
				    ],
				    yAxis : [
				        {
				            type : 'category',
				            splitLine: {show: false},
				            axisLabel : {
				    
				                textStyle: {
				                    color: '#fff',
				                    align: 'right'
				                }
				            },
				            data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11','12']
				        }
				    ],
				    series : [
				        {
				            name:'医疗事件',
				            type:'bar',
				            stack: '总量',
				            itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
				            data: [jun[0], feb[0], mar[0], apr[0], may[0], jun[0], jul[0], aug[0], sep[0], oct[0], nov[0], dec[0]]
				        },
				        {
				            name:'消防事件',
				            type:'bar',
				            stack: '总量',
				            itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
				            data: [jun[1], feb[1], mar[1], apr[1], may[1], jun[1], jul[1], aug[1], sep[1], oct[1], nov[1], dec[1]]
				        },
				        {
				            name:'刑事',
				            type:'bar',
				            stack: '总量',
				            itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
				            data: [jun[2], feb[2], mar[2], apr[2], may[2], jun[2], jul[2], aug[2], sep[2], oct[2], nov[2], dec[2]]
				        },
				        {
				            name:'民事',
				            type:'bar',
				            stack: '总量',
				            itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
				            data: [jun[3], feb[3], mar[3], apr[3], may[3], jun[3], jul[3], aug[3], sep[3], oct[3], nov[3], dec[3]]
				        },
				        {
				            name:'其它',
				            type:'bar',
				            stack: '总量',
				            itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
				            data: [jun[4], feb[4], mar[4], apr[4], may[4], jun[4], jul[4], aug[4], sep[4], oct[4], nov[4], dec[4]]
				        }
				    ]
				};
				
				myChart.setOption(option);
			},
			})
    });
}